package com.xiaoyu.lanling.feature.chat.contract

import `in`.srain.cube.app.lifecycle.IComponentContainer
import `in`.srain.cube.request.JsonData
import android.content.Intent
import android.view.MenuItem
import com.xiaoyu.lanling.feature.chat.model.intent.ChatIntentModel
import com.xiaoyu.lanling.feature.chat.model.message.ChatMessageBaseItem
import com.xiaoyu.lanling.feature.chat.model.relationship.Intimacy
import com.xiaoyu.lanling.feature.chat.model.tease.TeaseItem
import com.xiaoyu.lanling.feature.gift.model.Gift

interface ChatContract {
    interface View {
        fun onPause()

        fun onStop()

        fun onDestroy()

        fun onBackPressed(): Boolean

        fun onNewIntent(intent: Intent)

        fun updateMessageList(messageList: List<ChatMessageBaseItem>, scrollToBottom: Boolean, isFromSearch: Boolean, messageIndex: Int, messageId: String)

        fun dismissSwipeRefresh()

        fun clearMessageEdit()

        fun updateTitle(title: String?)

        fun updateUnreadCount(count: Int)

        fun setChatModel(chatIntentModel: ChatIntentModel)

        fun showProgressDialog();

        fun dismissProgressDialog();

        fun finish()

        fun checkEmoji(key: String)

        fun showTeaseList(list: List<TeaseItem>)

        fun hideMediaLayout()

        fun updateIntimacy(intimacy: Intimacy)

        fun enqueueOrPlayGiftAnimation(gift: Gift)

        fun performClickCall()
    }

    interface Presenter {
        fun getRequestTag(): Any

        fun processIntent(intent: Intent)

        fun setChatModel(chatIntentModel: ChatIntentModel)

        fun initEvent(container: IComponentContainer)

        val isSingleChat: Boolean

        val isSingleNormalChat: Boolean

        val chatType: String

        fun loadMoreMessageList()

        fun sendMessageText(message: String)

        fun onStartChat()

        fun onStopChat()

        fun loadTeaseList();
    }
}